#include "StdAfx.h"
#include "DialogBase.h"

using namespace Adaptive::Foundation;
using namespace Adaptive::Foundation::Windows::Forms;

/*--------------------------------------------------------------------------------
 * Constructor / Dispose / Destructor Methods
 *------------------------------------------------------------------------------*/
#pragma region Constructor / Dispose / Destructor Methods
// Initializes a new instance of the class.
DialogBase::DialogBase() : Form()
{
	InitializeComponent();
	Font = gcnew System::Drawing::Font("Tahoma", (float)8.25);
}
// Class destructor.
DialogBase::~DialogBase()
{
	if (components != nullptr)
		delete(components);

	components=nullptr;
}
// Dispose.
DialogBase::!DialogBase()
{
}
#pragma endregion

/*--------------------------------------------------------------------------------
 * Public Properties
 *------------------------------------------------------------------------------*/
#pragma region Public Properties
#pragma endregion

/*--------------------------------------------------------------------------------
 * Protected Methods / Event Methods
 *------------------------------------------------------------------------------*/
#pragma region Protected Methods / Event Methods
// Raises the <see cref="Form.Load"/> event.
void DialogBase::OnLoad(EventArgs^ e)
{
	//Call base method.
	__super::OnLoad(e);

	AssignEventHandlers();
	SetInitialContent();
	SetFormDisplay();

	StartFormThreads();
}
// Raises the <see cref="OnClosing"/> event.
void DialogBase::OnClosing(CancelEventArgs^ e)
{
	//Call base method.
	__super::OnClosing(e);

	if (!e->Cancel)
	{
		TerminateFormThreads();
		RemoveEventHandlers();
	}

}
// Creates and assigns event handlers for the events of the form's controls.
void DialogBase::AssignEventHandlers()
{
}
// Removes the event handler assignments for the events of the form's controls.
void DialogBase::RemoveEventHandlers()
{
}
// Sets the initial dialog data content.
void DialogBase::SetInitialContent()
{
}
// Sets or resets the display state of the dialog.
void DialogBase::SetFormDisplay()
{
}
// Laucnhes any background threads for the dialog.
void DialogBase::StartFormThreads()
{
}
// Terminates execution of any background form threads.
void DialogBase::TerminateFormThreads()
{
}
#pragma endregion

/*--------------------------------------------------------------------------------
 * Public Methods / Event Methods
 *------------------------------------------------------------------------------*/
#pragma region Public Methods / Event Methods
#pragma endregion

void DialogBase::InitializeComponent()
{
	components = gcnew System::ComponentModel::Container();
	AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
	Text = "DialogBase";

}